#include <REGX52.H>

void Timer( unsigned int X) 
{
	unsigned int a = 0;
	
	TMOD = 0x01;
	TH0 = (65536 - 9174) / 256;
	TL0 = (65536 - 9174) % 256;
	TR0 = 1;
	
	while(a < X)
	{
		while(TF0 == 0);
		TH0 = (65536 - 9174) / 256;
		TL0 = (65536 - 9174) % 256;
		a++;
		TF0 = 0;
	}
	a = 0;
}
